[gd_scene load_steps=16 format=2]

[ext_resource path="res://blokoj/kosmosxipoj/resursoj/laser_beam.tres" type="Material" id=1]
[ext_resource path="res://blokoj/kosmosxipoj/scenoj/moduloj/laser02/turret2.tscn" type="PackedScene" id=2]
[ext_resource path="res://blokoj/kosmosxipoj/scenoj/moduloj/laser02/tubo2.tscn" type="PackedScene" id=3]
[ext_resource path="res://blokoj/kosmosxipoj/scenoj/moduloj/laser02/platform2.tscn" type="PackedScene" id=4]
[ext_resource path="res://blokoj/kosmosxipoj/skriptoj/moduloj/laser.gd" type="Script" id=5]

[sub_resource type="CylinderMesh" id=1]
top_radius = 0.11
bottom_radius = 0.11
height = 1.0
radial_segments = 12
rings = 1

[sub_resource type="StandardMaterial3D" id=2]
albedo_color = Color( 0.0431373, 0.231373, 0.972549, 1 )

[sub_resource type="StandardMaterial3D" id=3]
params_billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false
albedo_color = Color( 0.968627, 0.803922, 0.0470588, 1 )
emission_enabled = true
emission = Color( 1, 0.984314, 0, 1 )
emission_energy = 16.0
emission_operator = 0
emission_on_uv2 = false

[sub_resource type="Curve" id=4]
_data = [ Vector2( 0.0253165, 0.990909 ), 0.0, 0.0, 0, 0, Vector2( 0.962025, 0 ), 0.0, 0.0, 0, 0 ]

[sub_resource type="CurveTexture" id=5]
width = 512
curve = SubResource( 4 )

[sub_resource type="ParticleProcessMaterial" id=6]
lifetime_randomness = 0.5
trail_size_modifier = SubResource( 5 )
direction = Vector3( 0, 0, 1 )
gravity = Vector3( 0, 0, 0 )
initial_velocity = 34.48
initial_velocity_random = 0.72

[sub_resource type="QuadMesh" id=7]
size = Vector2( 0.1, 0.1 )

[sub_resource type="QuadMesh" id=8]
material = ExtResource( 1 )
size = Vector2( 1, 0.3 )

[sub_resource type="BoxMesh" id=9]
size = Vector3( 1, 0.5, 1 )

[sub_resource type="StandardMaterial3D" id=10]
albedo_color = Color( 1, 1, 0, 1 )

[node name="laser_gun" type="Node3D"]
script = ExtResource( 5 )

[node name="laser" type="RayCast3D" parent="."]
enabled = true
exclude_parent = false
target_position = Vector3( 0, 0, 0 )
collide_with_areas = true

[node name="gun_stem" type="MeshInstance3D" parent="laser"]
transform = Transform3D( 1, 0, 0, 0, -1.62921e-07, -1, 0, 1, -1.62921e-07, 0, 0, -0.5 )
visible = false
mesh = SubResource( 1 )
material/0 = SubResource( 2 )

[node name="end_point" type="Node3D" parent="laser"]
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 100, 0, 0, 0 )
visible = false

[node name="Particles" type="Particles" parent="laser/end_point"]
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 0.01, 0, 0, 0 )
material_override = SubResource( 3 )
cast_shadow = 0
amount = 50
lifetime = 0.21
process_material = SubResource( 6 )
draw_pass_1 = SubResource( 7 )

[node name="beam" type="Node3D" parent="laser"]
transform = Transform3D( 1, 0, 0, 0, 1, 0, 0, 0, 100, 0, 0, 0 )
visible = false

[node name="MeshInstance3D" type="MeshInstance3D" parent="laser/beam"]
transform = Transform3D( -1.62921e-07, 0, 1, 0, 1, 0, -1, 0, -1.62921e-07, 0, 0, -0.5 )
cast_shadow = 0
mesh = SubResource( 8 )
material/0 = null

[node name="MeshInstance2" type="MeshInstance3D" parent="laser/beam"]
transform = Transform3D( -1.62921e-07, 1, -1.62921e-07, 0, -1.62921e-07, -1, -1, -1.62921e-07, 2.65431e-14, 0, 0, -0.5 )
cast_shadow = 0
mesh = SubResource( 8 )
material/0 = ExtResource( 1 )

[node name="tubo" parent="laser" instance=ExtResource( 3 )]
transform = Transform3D( -0.999973, 0, 0.00733026, 0, 1, 0, -0.00733026, 0, -0.999973, 0, 0, 0 )

[node name="gun_body" type="MeshInstance3D" parent="."]
visible = false
mesh = SubResource( 9 )
material/0 = SubResource( 10 )

[node name="Platform" parent="." instance=ExtResource( 4 )]

[node name="Turret" parent="." instance=ExtResource( 2 )]
